/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2025 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32g0xx_hal.h"
#include "Bldc_ext.h"
#include "LocalMath.h"
#include "timecnt.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define TIM1_BK_Pin GPIO_PIN_13
#define TIM1_BK_GPIO_Port GPIOC
#define DR_Pin GPIO_PIN_14
#define DR_GPIO_Port GPIOC
#define KEY_Pin GPIO_PIN_15
#define KEY_GPIO_Port GPIOC
#define A_Pin GPIO_PIN_0
#define A_GPIO_Port GPIOA
#define VBUS_Pin GPIO_PIN_3
#define VBUS_GPIO_Port GPIOA
#define IBUS_Pin GPIO_PIN_4
#define IBUS_GPIO_Port GPIOA
#define POT_Pin GPIO_PIN_5
#define POT_GPIO_Port GPIOA
#define HA_Pin GPIO_PIN_6
#define HA_GPIO_Port GPIOA
#define HB_Pin GPIO_PIN_7
#define HB_GPIO_Port GPIOA
#define HC_Pin GPIO_PIN_0
#define HC_GPIO_Port GPIOB
#define NTC_Pin GPIO_PIN_1
#define NTC_GPIO_Port GPIOB
#define TIM1_CH1N_Pin GPIO_PIN_13
#define TIM1_CH1N_GPIO_Port GPIOB
#define TIM1_CH2N_Pin GPIO_PIN_14
#define TIM1_CH2N_GPIO_Port GPIOB
#define TIM1_CH3N_Pin GPIO_PIN_15
#define TIM1_CH3N_GPIO_Port GPIOB
#define TIM1_CH1_Pin GPIO_PIN_8
#define TIM1_CH1_GPIO_Port GPIOA
#define TIM1_CH2_Pin GPIO_PIN_9
#define TIM1_CH2_GPIO_Port GPIOA
#define LED2_Pin GPIO_PIN_6
#define LED2_GPIO_Port GPIOC
#define LED1_Pin GPIO_PIN_7
#define LED1_GPIO_Port GPIOC
#define TIM1_CH3_Pin GPIO_PIN_10
#define TIM1_CH3_GPIO_Port GPIOA
#define NSSI_Pin GPIO_PIN_15
#define NSSI_GPIO_Port GPIOA
#define RES1_Pin GPIO_PIN_0
#define RES1_GPIO_Port GPIOD
#define DC1_Pin GPIO_PIN_1
#define DC1_GPIO_Port GPIOD
#define BLK_Pin GPIO_PIN_2
#define BLK_GPIO_Port GPIOD
#define TP1_Pin GPIO_PIN_3
#define TP1_GPIO_Port GPIOD
#define LED3_Pin GPIO_PIN_4
#define LED3_GPIO_Port GPIOB
#define USART1_TX_Pin GPIO_PIN_6
#define USART1_TX_GPIO_Port GPIOB
#define USART1_RX_Pin GPIO_PIN_7
#define USART1_RX_GPIO_Port GPIOB

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
